]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shellDBus: Update ::accelerator-activated handler arguments
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 8 Jul 2019 09:44:12 +0000 (11:44 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 8 Jul 2019 09:53:42 +0000 (11:53 +0200)
Mutter now passes a ClutterInputDevice. And use this to pass the
device ID (as we used to do) and the event node (so we can transition
to something that works on x11/wayland)

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/618

js/ui/shellDBus.js

index a9224f8417c3844ff0ec027330cae9fb9ba6a1be..1f328c9fe1eea349a47c2230abb822c39c856afa 100644 (file)
@@ -27,8 +27,8 @@ var GnomeShell = class {
         this._grabbers = new Map();
 
         global.display.connect('accelerator-activated',
-            (display, action, deviceid, timestamp) => {
-                this._emitAcceleratorActivated(action, deviceid, timestamp);
+            (display, action, device, timestamp) => {
+                this._emitAcceleratorActivated(action, device, timestamp);
             });
 
         this._cachedOverviewVisible = false;
@@ -144,14 +144,15 @@ var GnomeShell = class {
         return invocation.return_value(GLib.Variant.new('(b)', [ungrabSucceeded]));
     }
 
-    _emitAcceleratorActivated(action, deviceid, timestamp) {
+    _emitAcceleratorActivated(action, device, timestamp) {
         let destination = this._grabbedAccelerators.get(action);
         if (!destination)
             return;
 
         let connection = this._dbusImpl.get_connection();
         let info = this._dbusImpl.get_info();
-        let params = { 'device-id': GLib.Variant.new('u', deviceid),
+        let params = { 'device-id': GLib.Variant.new('u', device.get_device_id()),
+                       'device-node': GLib.Variant.new('s', device.get_device_node()),
                        'timestamp': GLib.Variant.new('u', timestamp),
                        'action-mode': GLib.Variant.new('u', Main.actionMode) };
         connection.emit_signal(destination,